<div class="{{# scrum_activated }}span4{{/ scrum_activated }} kanban-block">

{{# kanban_empty_message_must_be_displayed }}
    {{> empty-kanban }}
</div>
{{/ kanban_empty_message_must_be_displayed }}

{{^ kanban_empty_message_must_be_displayed }}
    <div class="ad-homepage-title">
        <h2>{{ kanban_title }}</h2>
        {{# is_user_admin }}
            {{# are_trackers_available }}
                <a id="add_kanban_button" href="#add-kanban-modal" data-toggle="modal" class="btn add-kanban">
            {{/are_trackers_available }}
            {{^ are_trackers_available }}
                <a id="add_kanban_button" data-toggle="tooltip" data-placement="right" title="{{ no_tracker_available }}" class="btn add-kanban disabled">
            {{/are_trackers_available }}
            <i class="fa fa-plus"></i> {{ add_kanban }}
        </a>
        {{/ is_user_admin }}
    </div>

    <div class="kanban-home-ad">
        {{# kanban_summary_presenters }}
        <div class="milestone">
            <div class="header">
                <p class="title">{{ name }} </p>
            </div>
            <div class="content">
                <div class="open"><span class="number">{{ count_open_kanban_items }}</span>{{ open }}</div>
                <div class="closed"><span class="number">{{ count_closed_kanban_items }}</span>{{ closed }}</div>
            </div>
            <div class="footer">
                <a href="?group_id={{ group_id }}&action=showKanban&id={{ id }}"><i class="fa fa-th-large"></i> {{ cardwall }}</a>
            </div>
        </div>
        {{/ kanban_summary_presenters }}
    </div>
</div>

<div id="add-kanban-modal"
        class="modal hide fade"
        tabindex="-1"
        role="dialog"
        aria-labelledby="myModalLabel"
        aria-hidden="true"
>
    <div class="modal-header">
        <h3> {{ add_kanban_modal_title }}</h3>
    </div>

    <form action="?group_id={{ group_id }}&action=createKanban" method="post" class="form-horizontal">
        <div class="modal-body">
            <ol>
                <li class="kanban-modal-element">
                     <div class="control-group">
                        <label class="control-label" for="kanban-name">{{ kanban_name_label }}</label>
                        <div class="controls">
                            <input type="text" id="kanban-name" name="kanban-name" placeholder="Name" required>
                        </div>
                    </div>
                </li>
                <li class="kanban-modal-element">
                    <div class="control-group">
                        <label class="control-label" for="tracker-kanban">{{ tracker_kanban_label }}</label>
                        <div class="controls">
                            <select id="tracker-kanban" name="tracker-kanban">
                                {{# trackers }}
                                <option value="{{ id }}" {{# used }} disabled {{/ used }}> {{ name }} </option>
                                {{/ trackers }}
                            </select>
                        </div>
                    </div>
                </li>
            </ol>
        </div>

        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true"> {{ btn_close_label }} </button>
            <input type="submit" class="btn btn-primary" name="add-keys" value="{{ btn_add_modal_label }}">
        </div>
    </form>
</div>
{{/ kanban_empty_message_must_be_displayed }}
